package com.itheima.demo1;

public class shuixianhuashuzi {
    public static void main(String[] args){
        int x = 0;
        for(int i = 100;i <= 999;i++){
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100;
            //int bai = i / 10 / 10 % 10;
            if(ge*ge*ge+shi*shi*shi+bai*bai*bai == i){
                System.out.println(i);
                x++;
            }
        }
        System.out.println("水仙花数的个数为"+x);
    }
}
